package com.itheima.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.entity.Result;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.CheckItem;
import com.itheima.service.CheckgroupCheckitemKeyService;
import com.itheima.service.HealthGroupService;
import com.itheima.service.HealthItemService;
import org.apache.zookeeper.data.Id;
import org.springframework.web.bind.annotation.*;

import java.lang.reflect.Array;
import java.util.List;

@RequestMapping("/checkgroup")
@RestController
public class HealthGroupController {

    @Reference
    private HealthGroupService healthGroupService;


    @PostMapping("/add")
    public Result AddHealthGroup(@RequestBody CheckGroup checkGroup,@RequestParam long[] checkitemIds){


        return healthGroupService.AddHealthGroup(checkGroup,checkitemIds);
    }

    @PostMapping("/delete")
    public Result deleteGroup(@RequestParam int id){

        return healthGroupService.deleteGroup(id);
    }



}
